/**
 * 
 */
package gameEngine;

import java.util.Hashtable;

/**
 * @author Joe R. Nassimian
 * @author Yannis Mazzer
 */
public class ShapeSpecs extends Hashtable<String,BoardSpecs> {
	/**
	 * Eclipse generated serial number.
	 */
	private static final long serialVersionUID = -7409140856154318995L;
	
	private final BoardSpecs backgammonSpecs = new BoardSpecs(new Integer[]{2},new Integer[][]{{2,12}});
	private final BoardSpecs blokusSquareSpecs = new BoardSpecs(new Integer[]{2},new Integer[][]{{4,20}});
	private final BoardSpecs blokusTriangleSpecs = new BoardSpecs(new Integer[]{2},new Integer[][]{{3,39}});
	private final BoardSpecs chessSpecs = new BoardSpecs(new Integer[]{2},new Integer[][]{{2,8}});


	public ShapeSpecs(GamesList _games) {
		this.put("BackgammonSquare", backgammonSpecs);
		this.put("BlokusSquare", blokusSquareSpecs);
		this.put("BlokusTriangle", blokusTriangleSpecs);
		this.put("ChessSquare", chessSpecs);
				
	}

	public Integer[] getBoardDim(String _name, String _shape) {
		String key = _name + _shape;
		return get(key).getDimensions();
	}
	
	public Integer[] getBoardNbPlayers(String _name, String _shape, int _dim){
		String key = _name + _shape;
		return get(key).getNbPlayers(_dim);
	}
	
	public int getBoardEdgeSize(String _name, String _shape, int _dim){
		String key = _name + _shape;
		return get(key).getEdgeSize(_dim);
	}
}
